export const Result_Name = 'Result'

/**
 * 响应结果类
 */
export class Result {
  // 响应结果状态，true 表示成功，false 表示失败
  private status: boolean
  // 响应结果描述信息
  private message: string
  // 响应结果数据
  private data: any

  constructor(status: boolean = true, message: string = '', data: any = null) {
    this.status = status
    this.message = message
    this.data = data
  }

  getStatus(): boolean {
    return this.status
  }

  setStatus(status: boolean): void {
    this.status = status
  }

  getMessage(): string {
    return this.message
  }

  setMessage(message: string): void {
    this.message = message
  }

  getData(): any {
    return this.data
  }

  setData(data: any): void {
    this.data = data
  }
}
